Skip to main content

Field Types and Logic in Flows

Work on the data in the flows by using fields to build logic, such as by comparing variables and values. By using an if/then condition action, you can, for instance, apply conditional logic to each step and specify which branch the flow will take depending on whether the condition is satisfied or not. When you execute the flow, the application will launch a flow based on the preset conditions, and you can compare the variables with the values you enter in the flow.

In the Flow Builder, you can specify the fields' input to come from a template, user input, or JSON. Additionally, it supports the storage of input data in variables. The format and structure of the data in the input and output of flows are defined by the various data types that Flow Builder supports.

Supported data types for the fields in the Flow Designer:

  • Boolean: A Boolean value can be either true or false.
  • Datetime: A Datetime value represents a date and time.
  • Integer: An Integer value is a whole number.
  • String: A String value is a sequence of characters.

Comparison operators can be used to compare different values and return either true or false. The table below lists the different comparison operators:

Operator Meaning Example Return Value

==

Equal to

7==7

True

!=

Not equal to

7!=7

False

<

Less than

7<9

True

 >

Greater than

7 > 7

False

Greater than or equal to

7≥7

True

Less than or equal to

7≤6

False

Here's an example of using if flow logic in a flow:

Consider you have an e-commerce website and want to send a discount code to customers based on their total order. You can create a flow with the following if logic:

Trigger: New customer order

Actions:

  1. Get the order total.
  2. If the order total is greater than 100 USD, notify a 20% discount code to the customer's email.
  3. If the order total is between 50 USD and 100 USD, notify a 10% discount code to the customer's email.
  4. If the order total is less than 50 USD, send a thank you email to the customer's email.

In this example, the flow is triggered when a new customer order is placed. The flow then checks the order total using if logic.

If the order total meets a specific condition, such as being greater than 100 USD, the flow takes a particular action, such as sending a 20% discount code.

If the condition is not met, the flow follows a different path and performs a different action.

This way, the flow dynamically responds to different order totals and sends appropriate discount codes or thank-you emails based on the conditions specified in the if logic.

Top of page